#ifndef CURRENTCREATION_HH
#define CURRENTCREATION_HH

#include "Pulse.h"
#include "NoPulse.h"
#include "SquarePulse.h"
#include "DoubleSquarePulse.h"
#include "NewParameters.h"
#include <iostream>

class CurrentCreation
{
public:
  static Pulse *NewPulse(NewParameters params)
  {
    if(params.getCurrentPulseType()=="square")
      {
	std::cout<<"square pulse"<<std::endl;
	return new SquarePulse();
      }
    if(params.getCurrentPulseType()=="nopulse")
      {
	std::cout<<"no pulse"<<std::endl;
	return new NoPulse();
      }
    if(params.getCurrentPulseType()=="doublesquare")
      {
	std::cout<<"double pulse"<<std::endl;
	return new DoubleSquarePulse();
      }
    return NULL;
  }
};

#endif
